FIND_PACKAGE(Octave 3.6 REQUIRED)
SET(OCTAVE_APIVERSION ${OCTAVE_API_VERSION})
UNSET(TARGET_SWIGFLAGS)

include(ShogunInterfaces)
include_directories(${OCTAVE_INCLUDE_DIRS})

GENERATE_INTERFACE_TARGET(octave ${CMAKE_CURRENT_SOURCE_DIR} ${OCTAVE_LIBRARY})
set_target_properties(interface_octave PROPERTIES PREFIX "")
set_target_properties(interface_octave PROPERTIES SUFFIX ".oct")
target_compile_definitions(interface_octave PRIVATE "OCTAVE_APIVERSION=${OCTAVE_API_VERSION}")

SET(INTERFACE_OCTAVE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
install (TARGETS interface_octave
    DESTINATION ${OCTAVE_OCT_LOCAL_API_FILE_DIR}/shogun
	COMPONENT octave)
